//
// Created by admin on 2023/1/30.
//

#ifndef BV_SELECT_H
#define BV_SELECT_H

#include <unistd.h>

namespace utils {

class Select {

public:
    Select();
    ~Select();

    void exit_block();
    void set_read_fd(int fd);

    ssize_t read(int target_fd, void *buf, size_t size);

private:
    int m_epoll_fd;
    int m_event_fd;
};

}


#endif //BV_SELECT_H
